package cn.yuanqiao.archive.liyong.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 我的收藏夹对象
 *
 * @ProjectName: JZSDAS
 * @Package: cn.yuanqiao.archive.liyong.domain
 * @ClassName: YqMyCollectMapper
 * @Author: lenovo
 * @Description: hbWang
 * @Date: 2023/8/9 15:24
 * @Version: 1.0
 */
public class YqMyCollect extends BaseEntity {

    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQ_MY_COLLECT";
    private String tableName;

    public YqMyCollect() {
        String tenantCode = SecurityUtils.getTenantCode();
        if (StringUtils.isEmpty(tenantCode)) {
            throw new ServiceException("TenantCode is null");
        } else {
            this.tableName = tenantCode.toUpperCase() + BIGTABLENAME;
        }
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    /**
     * 主键
     */
    @Excel(name = "主键")
    private String id;

    /**
     * 档案id
     */
    private String daId;

    /**
     * 档案内容
     */
    @Excel(name = "档案内容")
    private String daContent;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private String userId;

    /**
     * 关联表名
     */
    @Excel(name = "关联表名")
    private String subTableName;

    /**
     * 档号
     */
    @Excel(name = "档号")
    private String daNum;

    /**
     * 是否有电子件 0无  1有
     */
    @Excel(name = "是否有电子件 0无  1有")
    private String isEfile;

    /**
     * 是否有实体件
     */
    @Excel(name = "是否有实体件")
    private String isEntity;


    /**
     * 类型(1 个人  2 部门)
     */
    @Excel(name = "类型(1 个人  2 部门)")
    private String type;

    /**
     * 部门id
     */
    @Excel(name = "部门id")
    private String deptId;

    /**
     * 部门名称
     */
    @Excel(name = "部门名称")
    private String deptName;

    /**
     * 登录名称
     */
    @Excel(name = "登录名称")
    private String userName;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setDaId(String daId) {
        this.daId = daId;
    }

    public String getDaId() {
        return daId;
    }

    public void setDaContent(String daContent) {
        this.daContent = daContent;
    }

    public String getDaContent() {
        return daContent;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserId() {
        return userId;
    }

    public void setSubTableName(String subTableName) {
        this.subTableName = subTableName;
    }

    public String getSubTableName() {
        return subTableName;
    }

    public void setDaNum(String daNum) {
        this.daNum = daNum;
    }

    public String getDaNum() {
        return daNum;
    }

    public void setIsEfile(String isEfile) {
        this.isEfile = isEfile;
    }

    public String getIsEfile() {
        return isEfile;
    }

    public void setIsEntity(String isEntity) {
        this.isEntity = isEntity;
    }

    public String getIsEntity() {
        return isEntity;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("tableName", tableName)
                .append("id", id)
                .append("daId", daId)
                .append("daContent", daContent)
                .append("userId", userId)
                .append("subTableName", subTableName)
                .append("daNum", daNum)
                .append("isEfile", isEfile)
                .append("isEntity", isEntity)
                .append("type", type)
                .append("deptId", deptId)
                .append("deptName", deptName)
                .append("userName", userName)
                .toString();
    }
}
